<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>hello.exs</title>
<meta name="generator" content="KF5::SyntaxHighlighting (Elixir)"/>
</head><body style="color:#1f1c1b"><pre>
parent = self()

<span style="color:#898887;"># Spawns an Elixir process (not an operating system one!)</span>
spawn_link(<span style="font-weight:bold;">fn</span> -&gt;
  send parent, {<span style="color:#0057ae;">:msg</span>, <span style="color:#bf0303;">&quot;hello world&quot;</span>}
<span style="font-weight:bold;">end</span>)

<span style="color:#898887;"># Block until the message is received</span>
<span style="font-weight:bold;">receive</span> <span style="font-weight:bold;">do</span>
  {<span style="color:#0057ae;">:msg</span>, contents} -&gt; <span style="color:#aa5500;">IO</span>.puts contents
<span style="font-weight:bold;">end</span>
</pre></body></html>
